package com.example.controller;

import com.example.entity.Class;
import com.example.entity.Student;
import com.example.service.ClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ClassController {
    @Autowired
    private ClassService classService;

    @GetMapping("/get2/{classname2}")
    public Class getStudentByClassname2(@PathVariable String classname2) {
        return classService.findByClassname2(classname2);
    }
}
